<template>
	<view>
		<!-- my-header start -->
		<view class="my-header">
			<view class="my-header__logo">
				<view class="my-header__logo-box">
					<image :src="userInfo.avatar" mode="aspectFill"></image>
				</view>
				<text class="my-header__name">{{userInfo.author_name}}</text>
			</view>
			<view class="my-header__info">
				<view class="my-header__info-box">
					<text class="my-header__info-title">被关注</text>
					<text>{{userInfo.follow_count}}</text>
				</view>
				<view class="my-header__info-box">
					<text class="my-header__info-title">粉丝</text>
					<text>{{userInfo.fans_count}}</text>
				</view>
				<view class="my-header__info-box">
					<text class="my-header__info-title">积分</text>
					<text>{{userInfo.integral_count || 0}}</text>
				</view>
			</view>
			<view class="my-header__mask">
				<image :src="userInfo.avatar" mode="aspectFill"></image>
			</view>
		</view>
		<!-- my-header end -->
		<!-- my-content start -->
		<view class="my-content">
			<view class="my-content__list" @click="toGo('/pages/my-article/my-article')">
				<view class="my-content__list-title">
					<uni-icons class="icons" type="contact" size="16" color="#666"></uni-icons>
					<text>我的文章</text>
				</view>
				<view class="my-content__list-arrow">
					<uni-icons type="arrowright" size="14" color="#666"></uni-icons>
				</view>
			</view>
			<view class="my-content__list" @click="toGo('/pages/feedback/feedback')">
				<view class="my-content__list-title">
					<uni-icons class="icons" type="help" size="16" color="#666"></uni-icons>
					<text>意见反馈</text>
				</view>
				<view class="my-content__list-arrow">
					<uni-icons type="arrowright" size="14" color="#666"></uni-icons>
				</view>
			</view>
		</view>
		<!-- my-content end -->
	</view>
</template>

<script>
	import {mapState} from 'vuex';
	export default {
		data() {
			return {
			}
		},
		onLoad() {
		},
		methods: {
			// 跳转
			toGo(url) {
				uni.navigateTo({
					url
				})
			}
		},
		computed: {
			...mapState(['userInfo'])
		}
	}
</script>

<style lang="scss">
	page{
		background-color: #f5f5f5;
	}
	.my-header{
		padding-bottom: 30upx;
		position: relative;
		.my-header__logo{
			position: relative;
			z-index: 2;
			display: flex;
			flex-direction: column;
			align-items: center;
			padding-top: 60upx;
			.my-header__logo-box{
				width: 120upx;
				height: 120upx;
				border-radius: 50%;
				overflow: hidden;
				image{
					width: 100%;
					height: 100%;
				}
			}
			.my-header__name{
				margin-top: 30upx;
				font-size: 16px;
				font-weight: bold;
			}
		}
		.my-header__info{
			position: relative;
			z-index: 2;
			margin-top: 30upx;
			display: flex;
			.my-header__info-box{
				width: 100%;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: center;
				font-size: 24upx;
				color: #999;
				.my-header__info-title{
					font-size: 28upx;
					color: #333;
				}
			}
		}
		.my-header__mask{
			position: absolute;
			left: 0;
			right: 0;
			top: 0;
			bottom: 0;
			z-index: 1;
			filter: blur(16upx);
			opacity: .3;
			image{
				width: 100%;
				height: 100%;
			}
		}
	}
	.my-content{
		.my-content__list{
			display: flex;
			justify-content: space-between;
			padding: 30upx;
			margin-top: 20upx;
			background-color: #fff;
			color: #333;
			font-size: 28upx;
			.my-content__list-title{
				display: flex;
				align-items: center;
				.icons{
					margin-right: 10upx;
				}
			}
		}
	}
</style>
